import request from '@/utils/request'
// 获取全部角色
export const getroleList = (params) => {
  return request.get('/sys/role', { params })
}
// 新增
export const addRole = (data) => {
  return request.post('/sys/role', data)
}
// 更新
export const updateRole = (data) => {
  return request.put(`/sys/role/${data.id}`, data)
}
// 删除
export const deleteRole = (id) => {
  return request.delete(`/sys/role/${id}`)
}
// 获取角色详情
export const getRoleDetail = (id) => {
  return request.get(`/sys/role/${id}`)
}
// 角色分配权限
export const assignPer = (data) => {
  return request.put('/sys/role/assignPrem', data)
}
